package com.acsior.hibernate.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * Клас, който обслужва
 * 
 * @author <d.kolev@acsior.com>
 */
@Entity
@Table(name = "attribute_options")
@GeneratorKey(tableName = "attribute_options")
public class AttributeOptionVO extends HibernatePersistantIntegerIdVO {

	/** serialVersionUID */
	private static final long serialVersionUID = -4397393329284673580L;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "attribute_group_additional_attribute_id", nullable = false)
	private BuildingAttributeVO buildingAttribute;

	@Column(name = "name", nullable = false)
	private String name;

	@Column(name = "ordering", nullable = false)
	private int ordering;

	@Column(name = "system_name", nullable = false)
	private String sysName;

	/**
	 * @return the buildingAttribute
	 */
	public BuildingAttributeVO getBuildingAttribute() {
		return this.buildingAttribute;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return this.name;
	}

	/**
	 * @return the ordering
	 */
	public int getOrdering() {
		return this.ordering;
	}

	/**
	 * @return the sysName
	 */
	public String getSysName() {
		return this.sysName;
	}

	/**
	 * @param buildingAttribute
	 *            the buildingAttribute to set
	 */
	public void setBuildingAttribute(BuildingAttributeVO buildingAttribute) {
		this.buildingAttribute = buildingAttribute;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @param ordering
	 *            the ordering to set
	 */
	public void setOrdering(int ordering) {
		this.ordering = ordering;
	}

	/**
	 * @param sysName
	 *            the sysName to set
	 */
	public void setSysName(String sysName) {
		this.sysName = sysName;
	}
}
